.TH "IXP_PENDING_WRITE" 3 "2012 Dec" "libixp Manual"


.SH NAME

.P
ixp_pending_write, ixp_pending_print, ixp_pending_vprint, ixp_pending_pushfid, ixp_pending_clunk, ixp_pending_flush, ixp_pending_respond, IxpPending

.SH SYNOPSIS

.nf
#include <ixp_srvutil.h>

void ixp_pending_write(IxpPending *pending, const char *dat, long ndat);

int ixp_pending_print(IxpPending *pending, const char *fmt, ...);

int ixp_pending_vprint(IxpPending *pending, const char *fmt, va_list ap);

void ixp_pending_pushfid(IxpPending *pending, IxpFid *fid);

bool ixp_pending_clunk(Ixp9Req *req);

void ixp_pending_flush(Ixp9Req *req);

void ixp_pending_respond(Ixp9Req *req);

typedef struct IxpPending       IxpPending;
struct IxpPending {
        /* Private members */
        ...
}
.fi


.SH DESCRIPTION

.P
These functions aid in writing virtual files used for
broadcasting events or writing data when it becomes
available. When a file to be used with these functions is
opened, ixp_pending_pushfid should be called with its
\fBIxpFid(3)\fR as an argument. This sets the IxpFid's \fIpending\fR
member to true.  Thereafter, for each file with its
\fIpending\fR member set, ixp_pending_respond should be called
for each TRead request, ixp_pending_clunk for each TClunk
request, and ixp_pending_flush for each TFlush request.

.P
ixp_pending_write queues the data in \fIdat\fR of length \fIndat\fR
to be written to each currently pending fid in \fIpending\fR. If
there is a read request pending for a given fid, the data is
written immediately. Otherwise, it is written the next time
ixp_pending_respond is called. Likewise, if there is data
queued when ixp_pending_respond is called, it is written
immediately, otherwise the request is queued.

.P
ixp_pending_print and ixp_pending_vprint call ixp_pending_write
after formatting their arguments with \fBixp_vsmprint(3)\fR.

.P
The IxpPending data structure is opaque and should be
initialized zeroed before using these functions for the first
time.

.SH RETURN VALUE

.P
ixp_pending_clunk returns true if \fIpending\fR has any
more pending IxpFids.

.\" man code generated by txt2tags 2.6 (http://txt2tags.org)
.\" cmdline: txt2tags -o- ixp_pending_write.man3
